$(document).ready(function () {
    $(".upapp").click(function () {
        var appid = $(".upapp").attr("appinfoid");
        console.log(appid)
        $.ajax({
            url: "/dev/flatform/app/appup",
            method: 'POST',
            data: {
                "appid": appid
            },
            success: function (data) {
                if (data.success === true) {
                    if (confirm("上架成功！")) {
                        window.location.href = "/dev/flatform/app/list";
                    } else {
                        window.location.href = "/dev/flatform/app/list";
                    }
                }
            }
        })
    });

    $(".downapp").click(function () {
        var appid = $(".downapp").attr("appinfoid");
        console.log(appid)
        $.ajax({
            url: "/dev/flatform/app/appdown",
            method: 'POST',
            data: {
                "appid": appid
            },
            success: function (data) {
                if (data.success === true) {
                    if (confirm("下架成功！")) {
                        window.location.href = "/dev/flatform/app/list";
                    } else {
                        window.location.href = "/dev/flatform/app/list";
                    }
                }
            }
        })
    })
})